package com.project_test.kun.travelling_1st.Discovery.discover_detail_beans;

import android.util.Log;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by asus on 2016/10/17 09 49.
 * 邮箱:763433963@qq.com
 */



/*
*
*         "id": "713",
        "tid": "218",
        "create_time": "1470374605",
        "last_update": "1470378213",
        "t_sort": "0",
        "t_status": "1",
        "tag_title": "轰趴馆的狂浪之旅",
*
*
* */
public class discover_detail_detail_bean {
    private String id;
    private String tid;
    private String create_time;
    private String last_update;
    private String t_sort;
    private String t_status;
    private String tag_title;
    private List<discover_detail_detail_pict_bean> picts;

    public void parseJson(JSONObject json) throws JSONException {

        if (json != null) {
            id = json.optString("id");
            tid = json.optString("tid");
            create_time = json.optString("create_time");
            last_update = json.optString("last_update");
            t_sort = json.optString("t_sort");
            t_status = json.optString("t_status");
            tag_title = json.optString("tag_title");
            picts = new ArrayList<>();
            JSONArray list = json.getJSONArray("pict");
            int len = list.length();
            for (int i = 0; i < len; i++) {
                JSONObject jsonObject = list.getJSONObject(i);
                discover_detail_detail_pict_bean item = new discover_detail_detail_pict_bean();
                item.parseJson(jsonObject);
                picts.add(item);
            }
        }

    }

    public String getId() {
        return id;
    }

    public String getTid() {
        return tid;
    }

    public String getCreate_time() {
        return create_time;
    }

    public String getLast_update() {
        return last_update;
    }

    public String getT_sort() {
        return t_sort;
    }

    public String getT_status() {
        return t_status;
    }

    public String getTag_title() {
        return tag_title;
    }

    public List<discover_detail_detail_pict_bean> getPicts() {
        return picts;
    }


    public void setId(String id) {
        this.id = id;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public void setLast_update(String last_update) {
        this.last_update = last_update;
    }

    public void setT_sort(String t_sort) {
        this.t_sort = t_sort;
    }

    public void setT_status(String t_status) {
        this.t_status = t_status;
    }

    public void setTag_title(String tag_title) {
        this.tag_title = tag_title;
    }

    public void setPicts(List<discover_detail_detail_pict_bean> picts) {
        this.picts = picts;
    }
}
